A network interface controller (NIC) is a hardware device that provides network access to a computer system. Specifically, the NIC includes a network interface for receiving data packets from a network. The NIC further includes logic for processing data packets and transferring data packets into system memory for use by clients in the computer system. The specific method by which data packets are transferred generally depends on the NIC hardware, the computer system's underlying architecture, which operating system is running on the computer system, and/or other similar factors.
For example, the computer system may determine whether data packets are available for transfer to the computer system by periodically polling the NIC to determine the NIC's status (e.g., ready, waiting, error, etc.). If polling indicates that the NIC has received a data packet, then the data packet is transferred from the NIC into system memory. Alternatively, the NIC may issue an interrupt to the computer system when a data packet is received. Specifically, the interrupt may instruct the computer system to begin transferring the data packet into system memory. As network bandwidth usage increases, interrupts occur more frequently and may divert processing cycles from execution of other tasks.
Further, the computer system may use a method known as programmed input/output (PIO), whereby the computer system processor is responsible for executing instructions to transfer data packets into system memory. In such cases, transferring data packets may divert processing cycles from execution of other tasks. To avoid processing overhead required by PIO, the computer system may instead use direct memory access (DMA), whereby the NIC writes data packets directly into system memory, with little or no computer system processing required. Processing overhead may further be reduced by grouping data packets. That is, data packets may be transferred from the NIC in groups rather than individually.
Regardless of the specific method used to transfer data packets, the computer system may use a system clock to assign timestamps to data packets. Specifically, the timestamp assigned to each data packet corresponds to a time when the system clock is accessed. If data packets are grouped, especially if polling is used, the computer system does not have any way of determining the arrival times of individual data packets in the group. Accordingly, the same timestamp is generally assigned to all data packets in the group.
Even if timestamps are associated with individual data packets, a delay exists between the data packet's arrival and the time when the timestamp is obtained from the system clock. The delay may vary significantly depending on conditions in the computer system (e.g., processing load, interrupt priorities, bus load/contention, etc.). Thus, the accuracy of the timestamps, and of dispersions between the timestamps, may also vary significantly. Further, assigning timestamps may divert processing cycles from execution of other tasks, especially if estimation of timestamp dispersions is required.